package io.github.ali.commons.function;

import java.util.Objects;
import java.util.function.Function;

@FunctionalInterface
public interface ThrFunction<T, U, E, R> {
	R apply(T t, U u, E e);

	default <V> ThrFunction<T, U, E, V> andThen(Function<? super R, ? extends V> after) {
		Objects.requireNonNull(after);
		return (T t, U u, E e) -> after.apply(apply(t, u, e));
	}
}
